//
//  FQjcojJLCFHomeModuleCelltAzsUX.m
//  Jlcf_ios
//
//  Created by Ji on 2018/9/27.
//  Copyright © 2018 ski. All rights reserved.
//

#import "FQjcojJLCFHomeModuleCelltAzsUX.h"
#import "mFnyGKJLCFInviteWebViewControllertChoBH.h"
#import "SOMhUCJLCFHomeServiceControllerYMHYGy.h"

@interface FQjcojJLCFHomeModuleCelltAzsUX ()

@property (nonatomic, strong) UIButton *JQThpidataImgPFNXbm;
@property (nonatomic, strong) UILabel *usrOtLdataLabelApmEnH;

@property (nonatomic, strong) UIButton *WKUKrkinfoImgdHOsmo;
@property (nonatomic, strong) UILabel *HusjDNinfoLabelNjmZqJ;

@property (nonatomic, strong) UIButton *yFNNqasafeImgmpdeWH;
@property (nonatomic, strong) UILabel *RjHVnfsafeLabelXZBLac;

@property (nonatomic, strong) UIButton *vqdwuDinviteImgjilNZs;
@property (nonatomic, strong) UILabel *OVXErRinviteLabelUKJudN;

@end

@implementation FQjcojJLCFHomeModuleCelltAzsUX

- (void)reloadData
{
    
    self.backgroundColor = QTZ_White;
    CGFloat piece = FULL_WIDTH / 8;
    
    if (!self.JQThpidataImgPFNXbm) {
        self.JQThpidataImgPFNXbm = [UIButton new];
//        self.JQThpidataImgPFNXbm.image = [UIImage imageNamed:@"icon_homeHeader_data"];
//        self.JQThpidataImgPFNXbm.image = [UIImage imageNamed:@"icon_homeHeader_service"];
        [self.JQThpidataImgPFNXbm setImage:[UIImage imageNamed:@"icon_homeHeader_service"] forState:UIControlStateNormal];
        self.JQThpidataImgPFNXbm.width = 60;
        self.JQThpidataImgPFNXbm.height = 60;
        self.JQThpidataImgPFNXbm.top = 10;
        self.JQThpidataImgPFNXbm.centerX = piece;
        [self addSubview:self.JQThpidataImgPFNXbm];
        self.JQThpidataImgPFNXbm.userInteractionEnabled = YES;
        [self.JQThpidataImgPFNXbm bk_whenTapped:^{
            SOMhUCJLCFHomeServiceControllerYMHYGy *homeServiceVC = [SOMhUCJLCFHomeServiceControllerYMHYGy new];
            [[[JinLiCaiFuApplicationEntrace shareEntrance] currentNavController] pushViewController:homeServiceVC animated:YES];
            
//            JLCFBaseWebViewController *webVC = [[JLCFBaseWebViewController alloc] init];
//            webVC.url = QTZ_WEB_URL(@"data.html");
//            [[[JLCFApplicationEntrace shareEntrance] currentNavController] pushViewController:webVC animated:YES];
        }];
    }
    
    if (!self.usrOtLdataLabelApmEnH) {
//        self.usrOtLdataLabelApmEnH = [UILabel labelWithText:@"数据披露" textColor:QTZ_Gray102 font:FONT(8)];
        self.usrOtLdataLabelApmEnH = [UILabel labelWithText:@"客服中心" textColor:QTZ_Gray102 font:FONT(8)];
        self.usrOtLdataLabelApmEnH.centerX = self.JQThpidataImgPFNXbm.centerX;
        self.usrOtLdataLabelApmEnH.top = self.JQThpidataImgPFNXbm.bottom;
        [self addSubview:self.usrOtLdataLabelApmEnH];
    }
    
    if (!self.WKUKrkinfoImgdHOsmo) {
        self.WKUKrkinfoImgdHOsmo = [UIButton new];
        [self.WKUKrkinfoImgdHOsmo setImage:[UIImage imageNamed:@"icon_homeHeader_info"] forState:UIControlStateNormal];
//        self.WKUKrkinfoImgdHOsmo.image = [UIImage imageNamed:@"icon_homeHeader_info"];
        self.WKUKrkinfoImgdHOsmo.width = 60;
        self.WKUKrkinfoImgdHOsmo.height = 60;
        self.WKUKrkinfoImgdHOsmo.contentMode = UIViewContentModeScaleAspectFit;
        self.WKUKrkinfoImgdHOsmo.centerY = self.JQThpidataImgPFNXbm.centerY;
        self.WKUKrkinfoImgdHOsmo.centerX = piece * 3;
        [self addSubview:self.WKUKrkinfoImgdHOsmo];
        self.WKUKrkinfoImgdHOsmo.userInteractionEnabled = YES;
        [self.WKUKrkinfoImgdHOsmo bk_whenTapped:^{
            JLCFBaseWebViewController *webVC = [[JLCFBaseWebViewController alloc] init];
            webVC.url = QTZ_WEB_URL(@"msg.html");
            [[[JinLiCaiFuApplicationEntrace shareEntrance] currentNavController] pushViewController:webVC animated:YES];
        }];
    }
    
    if (!self.HusjDNinfoLabelNjmZqJ) {
        self.HusjDNinfoLabelNjmZqJ = [UILabel labelWithText:@"信息披露" textColor:QTZ_Gray102 font:FONT(8)];
        self.HusjDNinfoLabelNjmZqJ.centerX = self.WKUKrkinfoImgdHOsmo.centerX;
        self.HusjDNinfoLabelNjmZqJ.top = self.usrOtLdataLabelApmEnH.top;
        [self addSubview:self.HusjDNinfoLabelNjmZqJ];
    }
    
    if (!self.yFNNqasafeImgmpdeWH) {
        self.yFNNqasafeImgmpdeWH = [UIButton new];
//        self.yFNNqasafeImgmpdeWH.image = [UIImage imageNamed:@"icon_homeHeader_safe"];
        [self.yFNNqasafeImgmpdeWH setImage:[UIImage imageNamed:@"icon_homeHeader_safe"] forState:UIControlStateNormal];

        self.yFNNqasafeImgmpdeWH.width = 60;
        self.yFNNqasafeImgmpdeWH.height = 60;
        self.yFNNqasafeImgmpdeWH.centerY = self.JQThpidataImgPFNXbm.centerY;
        self.yFNNqasafeImgmpdeWH.centerX = piece * 5;
        [self addSubview:self.yFNNqasafeImgmpdeWH];
        self.yFNNqasafeImgmpdeWH.userInteractionEnabled = YES;
        [self.yFNNqasafeImgmpdeWH bk_whenTapped:^{
            JLCFBaseWebViewController *webVC = [[JLCFBaseWebViewController alloc] init];
            webVC.url = QTZ_WEB_URL(@"safe.html");
            [[[JinLiCaiFuApplicationEntrace shareEntrance] currentNavController] pushViewController:webVC animated:YES];
        }];
    }
    
    if (!self.RjHVnfsafeLabelXZBLac) {
        self.RjHVnfsafeLabelXZBLac = [UILabel labelWithText:@"安全保障" textColor:QTZ_Gray102 font:FONT(8)];
        self.RjHVnfsafeLabelXZBLac.centerX = self.yFNNqasafeImgmpdeWH.centerX;
        self.RjHVnfsafeLabelXZBLac.top = self.usrOtLdataLabelApmEnH.top;
        [self addSubview:self.RjHVnfsafeLabelXZBLac];
    }
    
    if (!self.vqdwuDinviteImgjilNZs) {
        self.vqdwuDinviteImgjilNZs = [UIButton new];
//        self.vqdwuDinviteImgjilNZs.image = [UIImage imageNamed:@"icon_homeHeader_invite"];
        [self.vqdwuDinviteImgjilNZs setImage:[UIImage imageNamed:@"icon_homeHeader_invite"] forState:UIControlStateNormal];

        self.vqdwuDinviteImgjilNZs.width = 60;
        self.vqdwuDinviteImgjilNZs.height = 60;
        self.vqdwuDinviteImgjilNZs.centerY = self.JQThpidataImgPFNXbm.centerY;
        self.vqdwuDinviteImgjilNZs.centerX = piece * 7;
        [self addSubview:self.vqdwuDinviteImgjilNZs];
        self.vqdwuDinviteImgjilNZs.userInteractionEnabled = YES;
        [self.vqdwuDinviteImgjilNZs bk_whenTapped:^{
            JLCFBaseWebViewController *webVC = [[JLCFBaseWebViewController alloc] init];
            webVC.url = QTZ_WEB_URL(@"share.html");
            [[[JinLiCaiFuApplicationEntrace shareEntrance] currentNavController] pushViewController:webVC animated:YES];
        }];
    }
    
    if (!self.OVXErRinviteLabelUKJudN) {
        self.OVXErRinviteLabelUKJudN = [UILabel labelWithText:@"邀请好友" textColor:QTZ_Gray102 font:FONT(8)];
        self.OVXErRinviteLabelUKJudN.centerX = self.vqdwuDinviteImgjilNZs.centerX;
        self.OVXErRinviteLabelUKJudN.top = self.usrOtLdataLabelApmEnH.top;
        [self addSubview:self.OVXErRinviteLabelUKJudN];
    }
    
    
}

@end
